package descentFly.controller
{
	import descentFly.df_space;
	
	import flash.display.Stage;
	import flash.events.Event;
	import flash.events.EventDispatcher;
	
	public class df_doorController extends FlyController {
		private var _open: Boolean = false;
		public function df_doorController(a_stage	: Stage, 
										  a_space	: df_space,
										  dispatchTarget:EventDispatcher=null, a_options: Object=null) {
			super(a_stage, a_space, dispatchTarget, a_options);
		}
		
		protected function checkNearest(): Boolean {
			return false;
		}
		
		override protected function doFrame():void {
			if (checkNearest()) {
				if (!_open) requestOpen();
			} else if (_open) requestClose();
		}
		
		protected function requestOpen(): void {
			_open = true;
		}
		
		protected function requestClose(): void {
			_open = false;
		}
	}
}